#include "test.h"
#include "board.h"
TimerHandle_t CPU_USAGE_TimerHandler;
void vCpuUsageTimerCallback( TimerHandle_t xTimer ) {
	printf("\rCPU Rate: %d%% heap_remain = %d B\b\b\b", osGetCPUUsage(), xPortGetFreeHeapSize());
}

void CPU_Usage_Init(void) {
	CPU_USAGE_TimerHandler = xTimerCreate("cpu_usage", 1000, pdTRUE, ( void * )0, vCpuUsageTimerCallback);
	if(CPU_USAGE_TimerHandler != NULL) {
		xTimerStart(CPU_USAGE_TimerHandler, 0);
	}
}
